package cn.yanglq.Rss.core.util.propsUtil;

import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Properties;

/**
 * Created by yanglq on 2017/6/6.
 */
public class PropsLoad {
    public PropsLoad() {
        throw new AssertionError();
    }

    static Properties prop = new Properties();

    public static Properties proLoad() throws IOException, ClassNotFoundException {

//        InputStream in=SendMail.class.getResourceAsStream("resources/mail.properties");
        InputStreamReader in = new InputStreamReader(PropsLoad.class.getClassLoader().getResourceAsStream("cn/yanglq/Rss/core/util/mailUtil/resources/mail.properties"), "utf-8");
//        InputStream in = SendMail.class.getClassLoader().getResourceAsStream("mail/mail.properties");
        prop.load(in);
        return prop;

    }
}
